﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using K9Nano.IM.Models;


namespace K9Nano.IM.ViewModels.UserVMs
{
    public partial class UserSearcher : BaseSearcher
    {
        [Display(Name = "APP")]
        public Guid? App { get; set; }

        public List<ComboSelectListItem> Apps { get; set; }

        [Display(Name = "账号")]
        public string ITCode { get; set; }

        [Display(Name = "姓名")]
        public string Name { get; set; }

        protected override void InitVM()
        {
            Apps = DC.Set<ChatApp>()
                .Select(x => new ComboSelectListItem
                {
                    Text = x.Name,
                    Value = x.ID
                })
                .ToList();
        }

    }
}
